package com.example.cachedemo.service.dto.check;

import com.example.cachedemo.service.dto.ClassInfo;
import lombok.Data;

//班级出勤率
public class ClassCheckRatioDTO {
    // 班级代码
    String ClassNo;
    //班级名称
    String className;
    //学期
    String termNo;
    //平均出勤率
    Float checkRatio;
    //所在部门平均出勤率
    Float depRatio;
    //出勤率差值Float
    Float ratioDiff;
    //总时长
    Long totalTime;

    public String getClassNo() {
        return ClassNo;
    }

    public void setClassNo(String classNo) {
        ClassNo = classNo;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getTermNo() {
        return termNo;
    }

    public void setTermNo(String termNo) {
        this.termNo = termNo;
    }

    public Float getCheckRatio() {
        return checkRatio;
    }

    public void setCheckRatio(Float checkRatio) {
        this.checkRatio = checkRatio;
    }

    public Float getDepRatio() {
        return depRatio;
    }

    public void setDepRatio(Float depRatio) {
        this.depRatio = depRatio;
    }

    public Float getRatioDiff() {
        return ratioDiff;
    }

    public void setRatioDiff(Float ratioDiff) {
        this.ratioDiff = ratioDiff;
    }

    public Long getTotalTime() {
        return totalTime;
    }

    public void setTotalTime(Long totalTime) {
        this.totalTime = totalTime;
    }

    public ClassCheckRatioDTO() {
    }

    public ClassCheckRatioDTO(ClassInfo classInfo,
                              String termNo, Float classRatio, Float depRatio) {
        this.setClassNo(classInfo.getClassNo());
        this.setClassName(classInfo.getClassName());
        this.setCheckRatio(classRatio);
        this.setDepRatio(depRatio);
        this.setRatioDiff(this.checkRatio - this.depRatio);
        this.setTermNo(termNo);
    }
}